﻿using System.Globalization;
using System.Windows.Data;

namespace GameView.Converts
{
    public class IntToStringConverter : IValueConverter
    {
        public static Dictionary<int, string> Dic = new()
        {
            [6001] = "在线",
            [6002] = "离线",
        };

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is int)
            {
                Dic.TryGetValue((int)value, out var res);
                return res;
            }
            return "";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    // BoolToColorConverter.cs
}